/*
 * EnumBase.hpp
 *
 *  Created on: 2018年3月30日
 *      Author: yaoqiaobing
 */

#ifndef INCLUDE_CONSTANT_SQLTYPEENUM_HPP_
#define INCLUDE_CONSTANT_SQLTYPEENUM_HPP_

#include <map>
#include <string>

/**
 * sql语句类型
 */
typedef enum {
	SQL_TYPE_INSERT,
	SQL_TYPE_DELETE,
	SQL_TYPE_UPDATE,
	SQL_TYPE_SELECT
} sql_type;

struct sql_type_map : std::map<sql_type, std::string> {
	sql_type_map() {
		this->operator[]( SQL_TYPE_INSERT ) = "SQL_TYPE_INSERT";
		this->operator[]( SQL_TYPE_DELETE ) = "SQL_TYPE_DELETE";
		this->operator[]( SQL_TYPE_UPDATE ) = "SQL_TYPE_UPDATE";
		this->operator[]( SQL_TYPE_SELECT ) = "SQL_TYPE_SELECT";
	};
	~sql_type_map(){};
};

#endif /* INCLUDE_CONSTANT_SQLTYPEENUM_HPP_ */
